<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>（转）前端缓存知识 | lty的博客</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/blog/favicon.ico">
    <meta name="description" content="山重水复疑无路，柳暗花明又一村">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/blog/assets/css/0.styles.ca934e57.css" as="style"><link rel="preload" href="/blog/assets/js/app.2c497286.js" as="script"><link rel="preload" href="/blog/assets/js/3.1e41fb2d.js" as="script"><link rel="preload" href="/blog/assets/js/1.a1bf8e1e.js" as="script"><link rel="preload" href="/blog/assets/js/29.e1d01502.js" as="script"><link rel="prefetch" href="/blog/assets/js/10.595db545.js"><link rel="prefetch" href="/blog/assets/js/11.a57c5d33.js"><link rel="prefetch" href="/blog/assets/js/12.bbd60eab.js"><link rel="prefetch" href="/blog/assets/js/13.0a322639.js"><link rel="prefetch" href="/blog/assets/js/14.45182424.js"><link rel="prefetch" href="/blog/assets/js/15.8bfecd82.js"><link rel="prefetch" href="/blog/assets/js/16.f295f32f.js"><link rel="prefetch" href="/blog/assets/js/17.de5dabe7.js"><link rel="prefetch" href="/blog/assets/js/18.dbcf4366.js"><link rel="prefetch" href="/blog/assets/js/19.dc4ed650.js"><link rel="prefetch" href="/blog/assets/js/20.9000ffe3.js"><link rel="prefetch" href="/blog/assets/js/21.50c08d3d.js"><link rel="prefetch" href="/blog/assets/js/22.849f004a.js"><link rel="prefetch" href="/blog/assets/js/23.4c25a240.js"><link rel="prefetch" href="/blog/assets/js/24.a2930e6d.js"><link rel="prefetch" href="/blog/assets/js/25.20efd6e6.js"><link rel="prefetch" href="/blog/assets/js/26.1881faa9.js"><link rel="prefetch" href="/blog/assets/js/27.18bc2dfe.js"><link rel="prefetch" href="/blog/assets/js/28.903117fb.js"><link rel="prefetch" href="/blog/assets/js/30.27049c11.js"><link rel="prefetch" href="/blog/assets/js/31.455cb7a6.js"><link rel="prefetch" href="/blog/assets/js/32.72aa7ec8.js"><link rel="prefetch" href="/blog/assets/js/33.6362e43e.js"><link rel="prefetch" href="/blog/assets/js/34.30160844.js"><link rel="prefetch" href="/blog/assets/js/35.991fefa1.js"><link rel="prefetch" href="/blog/assets/js/36.3350110b.js"><link rel="prefetch" href="/blog/assets/js/37.38b67684.js"><link rel="prefetch" href="/blog/assets/js/38.33876f62.js"><link rel="prefetch" href="/blog/assets/js/4.870f2524.js"><link rel="prefetch" href="/blog/assets/js/5.516ed845.js"><link rel="prefetch" href="/blog/assets/js/6.710883e3.js"><link rel="prefetch" href="/blog/assets/js/7.3579268a.js"><link rel="prefetch" href="/blog/assets/js/8.1e580575.js"><link rel="prefetch" href="/blog/assets/js/9.08e245bf.js">
    <link rel="stylesheet" href="/blog/assets/css/0.styles.ca934e57.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-1aefc0b4><div data-v-1aefc0b4><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-1aefc0b4 data-v-1aefc0b4><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-25ba6db2 data-v-1aefc0b4 data-v-1aefc0b4><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>lty的博客</h3> <p class="description" data-v-25ba6db2 data-v-25ba6db2>山重水复疑无路，柳暗花明又一村</p> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><span data-v-25ba6db2>lty</span>
            
          <!---->
          2022
        </a></span></div></div> <div class="hide" data-v-1aefc0b4><header class="navbar" data-v-1aefc0b4><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/blog/" class="home-link router-link-active"><img src="/blog/logo.png" alt="lty的博客" class="logo"> <span class="site-name">lty的博客</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/blog/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/categories/JavaScript/" class="nav-link"><i class="undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/投资/" class="nav-link"><i class="undefined"></i>
  投资
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/计算机网络/" class="nav-link"><i class="undefined"></i>
  计算机网络
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/前端相关/" class="nav-link"><i class="undefined"></i>
  前端相关
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/知识总结/" class="nav-link"><i class="undefined"></i>
  知识总结
</a></li></ul></div></div><div class="nav-item"><a href="/blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/ekzodia_lty" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-1aefc0b4></div> <aside class="sidebar" data-v-1aefc0b4><div class="personal-info-wrapper" data-v-39576ba9 data-v-1aefc0b4><img src="/blog/avatar.jpg" alt="author-avatar" class="personal-img" data-v-39576ba9> <h3 class="name" data-v-39576ba9>
    lty
  </h3> <div class="num" data-v-39576ba9><div data-v-39576ba9><h3 data-v-39576ba9>27</h3> <h6 data-v-39576ba9>Articles</h6></div> <div data-v-39576ba9><h3 data-v-39576ba9>18</h3> <h6 data-v-39576ba9>Tags</h6></div></div> <ul class="social-links" data-v-39576ba9></ul> <hr data-v-39576ba9></div> <nav class="nav-links"><div class="nav-item"><a href="/blog/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/categories/JavaScript/" class="nav-link"><i class="undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/投资/" class="nav-link"><i class="undefined"></i>
  投资
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/计算机网络/" class="nav-link"><i class="undefined"></i>
  计算机网络
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/前端相关/" class="nav-link"><i class="undefined"></i>
  前端相关
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/知识总结/" class="nav-link"><i class="undefined"></i>
  知识总结
</a></li></ul></div></div><div class="nav-item"><a href="/blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/ekzodia_lty" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-25ba6db2 data-v-1aefc0b4><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>（转）前端缓存知识</h3> <!----> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><span data-v-25ba6db2>lty</span>
            
          <!---->
          2022
        </a></span></div></div> <div data-v-1aefc0b4><main class="page"><section><div class="page-title"><h1 class="title">（转）前端缓存知识</h1> <div data-v-f875f3fc><i class="iconfont reco-account" data-v-f875f3fc><span data-v-f875f3fc>lty</span></i> <i class="iconfont reco-date" data-v-f875f3fc><span data-v-f875f3fc>9/21/2021</span></i> <i class="iconfont reco-eye" data-v-f875f3fc><span id="/blog/blogs/Other/cache.html" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-f875f3fc><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#999;"></a></span></i> <i class="tags iconfont reco-tag" data-v-f875f3fc><span class="tag-item" data-v-f875f3fc>前端缓存</span></i></div></div> <div class="theme-reco-content content__default"><blockquote><p>本文转载自：<a href="https://zhuanlan.zhihu.com/p/142311416" target="_blank" rel="noopener noreferrer">这是前端需要的缓存知识！ - 知乎 (zhihu.com)<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <h2 id="前言"><a href="#前言" class="header-anchor">#</a> 前言</h2> <p>作为一名优秀的前端开发者，必须了解浏览器以及http协议中的缓存策略。因为在日常的开发中，我们会经常接触到一些性能优化的需求，那么缓存（cache）这种技术无论是在前端开发领域也好，后端开发领域也好，也是一种非常常见以及有效的方案。只是前后端之间的缓存方式不太一样，而且后端很多时候需要缓存的是数据，而前端往往需要利用浏览器和http协议去缓存数据或者文件，从而达到提升加载速度的效果。</p> <h2 id="浏览器缓存"><a href="#浏览器缓存" class="header-anchor">#</a> 浏览器缓存</h2> <p>浏览器的缓存是通过HTTP协议中的一些特定的字段去控制某个文件是否进行缓存，过期时间等信息，用一张简单的图去描述浏览器是如何缓存文件的。</p> <p><img src="https://pic4.zhimg.com/80/v2-1bbb2c440c496bc579f0a2477b8a8f1f_720w.jpg" alt="img"></p> <p>浏览器分为两种缓存策略：</p> <ol><li>强缓存</li> <li>协商缓存</li></ol> <h2 id="强缓存"><a href="#强缓存" class="header-anchor">#</a> 强缓存</h2> <p>浏览器在先服务器获取资源之前，首先会查看当前的资源是否命中强缓存，如果命中了强缓存，那么将不会进行协商缓存，直接从缓存中获取资源内容进行缓存。</p> <p>设置一个资源的强缓存一般使用Expires(http1.0)和Cache-Control(http1.1)这两个响应头属性进行设置。</p> <h3 id="expires"><a href="#expires" class="header-anchor">#</a> Expires</h3> <p>Expires字段是http1.0的控制强缓存字段，其值是一个<strong>绝对时间</strong>的GMT格式的时间字符串。代表着该资源的有效时间。但是如果服务器和客户端之间的时间偏差较大，就会出现缓存混乱等情况。</p> <h3 id="cache-control"><a href="#cache-control" class="header-anchor">#</a> Cache-Control</h3> <p>Cache-Control是http1.1提出的新强缓存规范，它的值是一个相对时间，例如Cache-Control: max-age=90，代表该资源的有效时间是第一次获取资源后90秒失效。（也是现在最常用的强缓存控制字段）。Cache-Control还有一些其他值可以设置。</p> <ul><li>no-cache:：需要进行协商缓存，由服务器确认是否使用缓存。</li> <li>no-store： 禁止使用缓存，每一次都要重新请求服务器。</li> <li>public：可以被所有用户缓存，包括浏览器和cdn等中间代理商。</li> <li>private：只能对客户端（如浏览器）使用缓存。</li></ul> <blockquote><p>为了解决兼容问题，一般Expires和Cache-Control是同时设置的。在支持Cache-Control的http协议中，Cache-Control的优先级更高。</p></blockquote> <h2 id="协商缓存"><a href="#协商缓存" class="header-anchor">#</a> 协商缓存</h2> <p>协商缓存一般是强缓存没有命中，那么就会进入协商缓存，客户端将当前资源的一些信息携带在请求头的header当中，由服务器判断是否使用缓存，如果命中协商缓存，那么将返回304。</p> <h3 id="last-modify-if-modify-since"><a href="#last-modify-if-modify-since" class="header-anchor">#</a> Last-Modify/If-Modify-Since</h3> <p>浏览器首次请求一个资源的时候，服务器会返回该资源的最后修改时间，通过在响应头的Last-Modify属性中返回最后修改时间，浏览器会将该属性值保存起来，在下一次对同样的资源发起请求的时候，会将上一次请求时获取到Last-Modify的值携带在请求头的If-Modify-Since属性中，如果服务器验证最后修改时间一致，那么将会返回304。否则就会重启响应新的资源内容以及新的最后修改时间给浏览器。</p> <p>Last-Modify/If-Modify-Since属性有一个缺点，就是返回的值是最后修改时间进行判断的，但是如果文件在一个周期内，发生过改变，但是最后还是变回原样，那么最后修改的时间会发生变化，那么会导致协商缓存失效，导致文件内容并没有变化，但是浏览器会重新下载资源。为了解决这个问题，后来就出现了ETag/If-None-Match。</p> <h3 id="etag-if-none-match"><a href="#etag-if-none-match" class="header-anchor">#</a> ETag/If-None-Match</h3> <p>ETag/If-None-Match和Last-Modify/If-Modify-Since不一样，ETag/If-None-Match返回的是该资源的唯一标识，而且是个资源的内容挂钩的，如果你多次修改文件，但是文件最终的内容还是一样，那么ETag的标识码还是一样的。这样就有效的解决了Last-Modify/If-Modify-Since的问题。</p> <p>ETag/If-None-Match和Last-Modify/If-Modify-Since的携带方式是一样。</p> <h2 id="浏览器的资源缓存策略"><a href="#浏览器的资源缓存策略" class="header-anchor">#</a> 浏览器的资源缓存策略</h2> <p>在通过访问浏览器获取资源后，浏览器本身也有一套缓存的文件存放机制，主要分为<strong>memory cache</strong>和<strong>disk cache</strong>两种方式。从名字上就很清晰知道一个是存放在内存当中，一个是存放到硬盘当中。</p> <h3 id="memory-cache"><a href="#memory-cache" class="header-anchor">#</a> memory cache</h3> <p>webkit内核将资源分为两种，一种是HTML资源，或者下载项资源。另外一种是派生资源，例如JS、CSS和图片。webkit只支持对派生资源中的JS、CSS、图片等存放在memory cache中。其他派生资源都是存放在disk cache中。进程关闭时，内存缓存将会被清除。</p> <p><img src="https://pic3.zhimg.com/80/v2-1d68403bd6e9a15932549c9e96289396_720w.png" alt="img"></p> <h3 id="disk-cache"><a href="#disk-cache" class="header-anchor">#</a> disk cache</h3> <p>如上述所说的，资源都会存放到硬盘中。进程关闭时，硬盘缓存不会清除。那么什么资源什么时候会存放到硬盘，什么时候会存放到内存呢？</p> <p><img src="https://pic4.zhimg.com/80/v2-1b995c207dd58cbf06af6d00ce95bdf3_720w.png" alt="img"></p> <blockquote><p>这个需要看当前的资源的大小，内存空间是否足够等因素决定。</p></blockquote> <h2 id="浏览器三级缓存"><a href="#浏览器三级缓存" class="header-anchor">#</a> 浏览器三级缓存</h2> <ul><li>内存中查找缓存资源</li> <li>内存中没有查找到缓存资源将会在硬盘中查找</li> <li>硬盘中查找不到资源，将会发起请求获取远程资源</li> <li>获取到资源后根据资源的类型分别存放到内存或者硬盘中。</li></ul> <h2 id="总结"><a href="#总结" class="header-anchor">#</a> 总结</h2> <p>浏览器缓存一般又三部分组成。</p> <ul><li>强缓存</li> <li>协商缓存</li> <li>浏览器的三层缓存</li></ul> <p>理解浏览器和http协议中控制缓存的字段对我们日后进行性能优化起到很关键的作用。</p></div></section> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated: </span> <span class="time">3/20/2022, 10:07:00 PM</span></div></footer> <!----> <div class="comments-wrapper"><!----></div> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-cb1513f6><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#前言" class="sidebar-link reco-side-前言" data-v-cb1513f6>前言</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#浏览器缓存" class="sidebar-link reco-side-浏览器缓存" data-v-cb1513f6>浏览器缓存</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#强缓存" class="sidebar-link reco-side-强缓存" data-v-cb1513f6>强缓存</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#expires" class="sidebar-link reco-side-expires" data-v-cb1513f6>Expires</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#cache-control" class="sidebar-link reco-side-cache-control" data-v-cb1513f6>Cache-Control</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#协商缓存" class="sidebar-link reco-side-协商缓存" data-v-cb1513f6>协商缓存</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#last-modify-if-modify-since" class="sidebar-link reco-side-last-modify-if-modify-since" data-v-cb1513f6>Last-Modify/If-Modify-Since</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#etag-if-none-match" class="sidebar-link reco-side-etag-if-none-match" data-v-cb1513f6>ETag/If-None-Match</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#浏览器的资源缓存策略" class="sidebar-link reco-side-浏览器的资源缓存策略" data-v-cb1513f6>浏览器的资源缓存策略</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#memory-cache" class="sidebar-link reco-side-memory-cache" data-v-cb1513f6>memory cache</a></li><li class="level-3" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#disk-cache" class="sidebar-link reco-side-disk-cache" data-v-cb1513f6>disk cache</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#浏览器三级缓存" class="sidebar-link reco-side-浏览器三级缓存" data-v-cb1513f6>浏览器三级缓存</a></li><li class="level-2" data-v-cb1513f6><a href="/blog/blogs/Other/cache.html#总结" class="sidebar-link reco-side-总结" data-v-cb1513f6>总结</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div></div></div>
    <script src="/blog/assets/js/app.2c497286.js" defer></script><script src="/blog/assets/js/3.1e41fb2d.js" defer></script><script src="/blog/assets/js/1.a1bf8e1e.js" defer></script><script src="/blog/assets/js/29.e1d01502.js" defer></script>
  </body>
</html>
